package com.lagou.multipartdatasource.mapper;

import com.lagou.multipartdatasource.domain.Student;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {
    @Select("SELECT id,name,score FROM  student ")
    public List<Student> findUser();

    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
    @Select("insert into student(name,score) values (#{name},#{score}); ")
    public void insertUser(Student student);
}